package com.wgc.search.listener;

import com.wgc.search.config.RabbitConfig;
import com.wgc.search.service.ESManagerService;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
class GoodsDownListener {
    @Autowired
    private ESManagerService esManagerService;

    @RabbitListener(queues = RabbitConfig.GOODS_DOWN_QUEUE)
    public void goodsDownListener(String id) {
        esManagerService.deleteById(id);
    }
}
